<?php
/**
 * Joomla! 1.5 component JoomGPSTracks
 *
 * @version $Id: default.php 2009-06-24 15:40:19 svn $
 * @author Michael Pfister
 * @package joomGPStracks
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */

defined('_JEXEC') or die('Restricted access');

// toolbar
JToolBarHelper::title(JText::_('GPS_CONFIG'), 'generic.png');
JToolBarHelper::back($alt= 'Back', $href= 'javascript:history.back();');
JToolBarHelper::save('saveconfig', 'Save', 'save.png' );

jimport('joomla.html.pane');
JHTML::_('behavior.tooltip');
?>
<form action="" method="post" name="adminForm" id="adminForm" class="adminForm">
    <?php
	$tabs	=& JPane::getInstance('tabs');

	echo $tabs->startPane('configuration');
	echo $tabs->startPanel(JText::_('GPS_MAINCONF'), 'mainconfig');
    ?>
    <table class="admintable">
        <tbody>
            <tr>
                <td><?php echo JText::_( 'GPS_GOOGLE_API_CODE' ); ?></td>
                <td><input type="text" name="apikey" value="<?php echo $this->config->apikey; ?>" size="60" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_( 'GPS_IMAGETYPES' ); ?></td>
                <td><input type="text" name="type" value="<?php echo $this->config->type; ?>" size="30" /></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_SIZE_DESC'); ?>"><?php echo JText::_( 'GPS_IMAGESIZE' ); ?></span></td>
                <td><input type="text" name="max_size" value="<?php echo $this->config->max_size; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_GID_DESC'); ?>"><?php echo JText::_('GPS_USERS'); ?></span></td>
                <td><?php echo $this->lists['gid']; ?></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_ACCESS'); ?>"><?php echo JText::_('GPS_ACCESS'); ?></span></td>
                <td><?php echo $this->lists['access']; ?></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_TERMS_USE'); ?>"><?php echo JText::_('GPS_TERMS_USE'); ?></span></td>
                <td>
                    <select name="terms" size="2">
                            <option value="1" <?php if($this->config->terms == "1") echo "selected=selected"; ?> ><?php echo JText::_('yes'); ?></option>
                            <option value="0" <?php if($this->config->terms == "0") echo "selected=selected"; ?> ><?php echo JText::_('no'); ?></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_TERMS'); ?>"><?php echo JText::_('GPS_TERMS'); ?></span></td>
                <td><?php echo $this->lists['content']; ?></td>
            </tr>
            <tr>
                <td colspan="2"><b><?php echo JText::_('GPS_INTEGRATION'); ?></b></td>
            </tr>
            <tr>
                <td><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_PROFILEEXT'); ?>"><?php echo JText::_('GPS_PROFILEEXT'); ?></span></td>
                <td>
                    <select name="profile" size="1">
                            <option value="0" <?php if($this->config->profile == "0") echo "selected=selected"; ?> ><?php echo JText::_('GPS_NO_PROFILE'); ?></option>
                            <option value="cb" <?php if($this->config->profile == "cb") echo "selected=selected"; ?> >Community Builder</option>
                            <option value="js" <?php if($this->config->profile == "js") echo "selected=selected"; ?> >JomSocial</option>
                            <option value="ku" <?php if($this->config->profile == "ku") echo "selected=selected"; ?> >Kunena</option>
                    </select>
                </td>
            </tr>
        </tbody>
    </table>
    <?php
    echo $tabs->endPanel();
    echo $tabs->startPanel(JText::_('GPS_DISPLAY'), 'display');
    ?>
    <table class="admintable">
        <tbody>
            <tr>
                <td><?php echo JText::_('GPS_TEMPLATE'); ?></td>
                <td><?php echo $this->lists['tmpl']; ?></td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_SORT'); ?></td>
                <td><input type="text" name="sort" value="<?php echo $this->config->sort; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_MAPHEIGHT'); ?></td>
                <td><input type="text" name="map_height" value="<?php echo $this->config->map_height; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_MAPWIDTH'); ?></td>
                <td><input type="text" name="map_width" value="<?php echo $this->config->map_width; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_MAP_TYPE'); ?></td>
                <td><select name="map_type">
                        <option value=""><?php echo JText::_('GPS_SELECT'); ?></option>
                        <option value="0" <?php if($this->config->map_type == 0): echo "selected='selected'"; endif; ?> ><?php echo JText::_('GPS_STANDARDMAP'); ?></option>
                        <option value="1" <?php if($this->config->map_type == 1): echo "selected='selected'"; endif; ?> ><?php echo JText::_('GPS_SATELITEMAP'); ?></option>
                        <option value="2" <?php if($this->config->map_type == 2): echo "selected='selected'"; endif; ?> ><?php echo JText::_('GPS_HYBRIDMAP'); ?></option>
                        <option value="3" <?php if($this->config->map_type == 3): echo "selected='selected'"; endif; ?> ><?php echo JText::_('GPS_PHYSICALMAP'); ?></option>
                    </select></td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_UNIT'); ?></td>
                <td><?php echo $this->lists['unit']; ?></td>
            </tr>
            <tr>
                <td colspan="2"><b><?php echo JText::_('GPS_CHARTS_PROFILE'); ?></b></td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_CHARTWIDTH'); ?></td>
                <td><input type="text" name="charts_width" value="<?php echo $this->config->charts_width; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_CHARTHEIGTH'); ?></td>
                <td><input type="text" name="charts_heigth" value="<?php echo $this->config->charts_heigth; ?>" size="20" /> px</td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_CHARTLINEC'); ?></td>
                <td>#<input type="text" name="charts_linec" value="<?php echo $this->config->charts_linec; ?>" size="20" /></td>
            </tr>
            <tr>
                <td><?php echo JText::_('GPS_CHARTBG'); ?></td>
                <td>#<input type="text" name="charts_bg" value="<?php echo $this->config->charts_bg; ?>" size="20" /></td>
            </tr>
        </tbody>
    </table>
    <?php
    echo $tabs->endPanel();
    echo $tabs->startPanel(JText::_('GPS_COMMENTS'), 'display');
    ?>
    <table class="admintable">
        <tr>
            <td valign="top"><?php echo JText::_('GPS_ACTIVATE_COMMENTS'); ?></td>
            <td><?php echo $this->lists['comments']; ?></td>
        </tr>
        <tr>
            <td valign="top"><?php echo JText::_('GPS_COMMENT_WHO'); ?></td>
            <td><?php echo $this->lists['who']; ?></td>
        </tr>
        <tr>
            <td valign="top"><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_INFORM_AUTOR'); ?>"><?php echo JText::_('GPS_INFORM_AUTOR'); ?></span></td>
            <td><?php echo $this->lists['inform']; ?></td>
        </tr>
        <tr>
            <td valign="top"><span class="hasTip" title="<?php echo JText::_('GPS_TT_TITLE'); ?> :: <?php echo JText::_('GPS_TT_CAPTCHA'); ?>"><?php echo JText::_('GPS_CAPTCHA'); ?></span></td>
            <td><?php echo $this->lists['captcha']; ?><div><?php echo JText::_('GPS_OST_CAPTCHA')." ".$this->captcha; ?></div></td>     
        </tr>
        <tr>
            <td valign="top"><?php echo JText::_('GPS_ORDERING'); ?></td>
            <td><?php echo $this->lists['order']; ?></td>
        </tr>
    </table>
    <?php
    echo $tabs->endPanel();
    echo $tabs->endPane();
    echo JHTML::_( 'form.token' );
    ?>
    <input type="hidden" name="option" value="com_joomgpstracks" />
    <input type="hidden" name="id" value="1" />
    <input type="hidden" name="task" value="" />
</form>